package com.apps.helper;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

/**
 * 历史页面管理工具
 */
@Service
public class HistoryPageHelper {

    @Autowired
    private RedisTemplate<String,Object> redisTemplate;



    public void put(String url)
    {
          redisTemplate.opsForValue().set("upurl",url);
    }

    public String get()
    {
        Object result = redisTemplate.opsForValue().get("upurl");
        if(null == result)
            return "/";
        return result.toString();
    }
}
